home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / public / ghostscript / src / ps2epsi.bat < prev    next >
DOS Batch File  |  1994-08-01  |  656b  |  26 lines

  1. @echo off 
  2. if "%1"=="" goto usage
  3. if "%2"=="" goto usage
  4.  
  5. set infile=%1
  6. set outfile=%2
  7.  
  8. rem Ghostscript uses %outfile% to define the output file
  9. gs -q -dNOPAUSE -dNODISPLAY ps2epsi.ps < %infile%
  10.  
  11. rem We bracket the actual file with a few commands to help encapsulation
  12. echo /InitDictCount countdictstack def gsave save mark newpath >> %outfile%
  13.  
  14. rem Append the original onto the preview header
  15. copy %outfile% + %infile%
  16.  
  17. echo countdictstack InitDictCount sub { end } repeat >> %outfile%
  18. echo cleartomark restore grestore >> %outfile%
  19.  
  20. goto end
  21.  
  22. :usage
  23. echo "Usage: ps2epsi <infile.ps> <outfile.epi>"
  24.  
  25. :end
  26.